// -*- c++ -*-

//
// StreamFlowC : A C++ coding style to describe hardware structure for stream processing
//

// Copyright (c) 2009 the handy-eda-utils developer(s).
// Distributed under the MIT License.
// (See accompanying file COPYING or copy at
//  http://www.opensource.org/licenses/mit-license.php.)

template <typename T>
module headcut {
 param:
  int    n;  // discard first "n" inputs
 input:
  T      a;
 output:
  T      y;
};

headcut(a) {
  if (m_n != 0) {
    -- m_n;
  } else {
    y_out(a);
  }
}
